//ECMAscript 内置对象
let b: Boolean = new Boolean(1)
console.log(b);

let n: Number = new Number(true)
console.log(n);

let s: String = new String('我是全世界最帅的男人')
console.log(s);

let d: Date = new Date()
console.log(d);

let e: Error = new Error('error!')
console.log(e);

//promise
function promise(): Promise<number> {
  return new Promise<number>((resolve, reject) => {
    resolve(1)
  })
}
promise().then(res => {
  console.log(res);

})